/**
 * @file k2os.h
 * @author your name (you@domain.com)
 * @brief 
 * @version 0.1
 * @date 2022-07-14
 * 
 * @copyright Copyright (c) 2022
 * 
 */


#ifndef __K2OS_H
#define __K2OS_H

#include "port.h"
#include "k2os_private.h"
#include "k2os_config.h"



/**
 **************************************************************************
 *                      global errCode
 **************************************************************************
 */
#define OS_ERR_NONE                                     (0)
#define OS_ERR_PRIORITY_EXIST                           (-1)
#define OS_ERR_PRIORITY_INVALID                         (-2)
#define OS_ERR_TASK_CREATE_WITHIN_ISR                   (-3)
#define OS_ERR_TASK_CREATE_MALLOC_TCB                   (-4)
#define OS_ERR_TCB_INIT_PARAM_ILLEGAL                   (-5)
#define OS_ERR_TASK_DLY_ISR                             (-6)

void os_task_return(void);

void os_init(void);

void os_start(void);

u8_t os_get_running_status(void);

s16_t os_task_create(void (*task)(void *arg), void *arg, os_stk_t *stack, u8_t priority);

s16_t os_task_dly(u32_t ms);




#endif
